import Link from "next/link";
import { Modal } from "./modal";

export default async function PhotoModal({
    params,
}: {
    params: Promise<{ id: string }>;
}) {
    const photoId = (await params).id;
    return (
        <Modal>
            <Link
                href={`/routing/intercepting-routes/photos/${
                    parseInt(photoId) - 1
                }`}
            >prev</Link>
            <div>{photoId}</div>
            <Link
                href={`/routing/intercepting-routes/photos/${
                    parseInt(photoId) + 1
                }`}
            >next</Link>
        </Modal>
    );
}
